#ifndef _BLOCK_H
#define _BLOCK_H

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "../bool/bool.h"
#include "../util/util.h"

#define ADDR_BLOCK_SIZE 4
#define MAX_ADDR_BLOCK 2000

//tipe bentukan
typedef struct {
	unsigned long addr;
	char* bytes;
} block_t;

//bikin blok baru
void createBlock(block_t* block);

//baca blok sesuai alamat
block_t readBlock(FILE* hdd,unsigned long addrBlock);

//tulis blok ke device
void writeBlock(FILE* hdd, block_t block);

#endif
